{% extends 'base.html' %}

{% block contents %}
    
<h2>{{ movie.title_ }}</h2>

        Owner:<a href="mailto:{{movie.contact_mail}}">{{movie.owner_nickname}}</a><br/>
        Media:{{ movie.media_text }}<br/>
	Genre:{{ movie.genre_text }}<br/>
        Status:{{movie.status_text}}<br/>
	<P/>
        {% if movie.buy_url %}<a href="{{movie.buy_url_}}">Buy it.</a>{% else %}<a href="http://www.play.com/Search.aspx?searchtype=allproducts&searchstring={{movie.title}}&page=search&pa=search&go.x=0&go.y=0">play.com</a>{% endif %}<br/>
        <a href="{{movie.imdb_qs}}">ImDB.</a><br/>
	Kudos:{{movie.kudos_count}}<br/>
	Total rating:{{movie.calculated_rating}}<br/>
	<P/>
	
{%if movie.comments %}
Comments:
<blockquote>{{movie.comments_}}</blockquote>
{% endif %}

<h3>Ratings</h3>
<ul>
{% for rating in movie.ratings %}
  <li>{{rating.rating}}: {{rating.user.nickname}}</li>
{% endfor %}
</ul>
<P/>


<h3>Comments</h3>
<P/>
<form action="." method="POST">
Add your comment:<P/>
<textarea name="movie_comment" cols=50 rows=10></textarea>
<P/>
<input type="submit" value="Add your comment"/>
</form>
<P/>
{% for comment in movie.user_comments %}
<div class="comment_box">
{{comment.created_on}}, {{comment.author.nickname_ }} says:
<blockquote>
  {{comment.comment_}}
</blockquote>
<a href="/delete_comment/{{comment.key}}">Delete comment</a>
</div>
{% endfor %}

{% endblock %}